<%@ page import="com.demo.servlet.demo1213.entity.Person" %>
<%@ page import="java.util.List" %>
<%--
  Created by IntelliJ IDEA.
  User: WuLiangHang
  Date: 2021/12/13
  Time: 11:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    List<Person> people = (List<Person>) request.getAttribute("people");
%>
<html>
<head>
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
          integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
</head>
<body>

<table class="table">
    <thead>
    <td>ID</td>
    <td>姓名</td>
    <td>年龄</td>
    <td>性别</td>
    </thead>
    <tbody>

    <%
        for (int i = 0; i < people.size(); i++) {
            Person person = people.get(i);

    %>
    <%--  HTML部分  --%>
    <tr>
        <td><%=person.getId()%>
        </td>
        <td><%=person.getName()%>
        </td>
        <td><%=person.getAge()%>
        </td>
        <td><%=person.getSex()%>
        </td>
    </tr>
    <%
        }
    %>
    </tbody>

</table>

<!-- 1.11.3版本的 jquery.js , bootstrap.min.js 依赖 jquery.js  -->
<script type="text/javascript" src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
        crossorigin="anonymous"></script>
</body>
</html>
